package com.chb.jblog.web.controller;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.chb.jblog.entity.User;
@Controller
@RequestMapping("/json")
public class JsonView {
	@RequestMapping("/1")
	@ResponseBody
	public List<User> users(){
		List<User> users = new ArrayList<User>();
		for(int i=0;i<3;i++){
			User u = new User();
			u.setId(1);
			u.setEmail("240982248@qq.com");
			u.setBirthday(new Date());
			users.add(u);
		}
		return users;
	}
}
